# coding: utf8
__author__ = 'tony'

from django.contrib import admin
from umeng_tool.analyse.models import *


class UmengSDKAdmin(admin.ModelAdmin):
	list_display = ('sdk_type', 'sdk_version')

admin.site.register(UmengSDK, UmengSDKAdmin)


class AppInfoAdmin(admin.ModelAdmin):
	list_display = ('appkey', 'package_name', 'app_version', 'channel', 'version_code', '_umeng_sdk')

admin.site.register(AppInfo, AppInfoAdmin)


class DeviceAdmin(admin.ModelAdmin):
	list_display = (
		'device_model',
		'resolution',
		'device_manufacturer',
		'cpu',
		'device_brand',
		'os',
		'os_version',
		'device_manuid',
		'device_weight',
	)

admin.site.register(Device, DeviceAdmin)


class PhoneDeviceAdmin(admin.ModelAdmin):
	exclude = ('_mc', '_idmd5')
	list_display = (
		'device_model',
		'resolution',
		'carrier',
		'device_board',
		'device_manufacturer',
		'cpu',
		'device_id',
		'device_brand',
		'access',
		'_access',
		'access_subtype',
		'country',
		'idmd5',
		'os',
		'os_version',
		'device_manuid',
		'mc',
		'_app',
	)

admin.site.register(PhoneDevice, PhoneDeviceAdmin)


class VirtualUserAdmin(admin.ModelAdmin):
	list_display = (
		'device',
		'launch_datetime',
		'launch_session_id',
		'terminate_duration',
		'terminate_session_id',
		'terminate_datetime',
		'today_online_seconds',
		'online_days',
		'create_time',
	)

admin.site.register(VirtualUser, VirtualUserAdmin)